package com.hymane.materialbook;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;


import static org.junit.Assert.*;

/**
 * Instrumentation test, which will execute on an Android device.
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
@MediumTest
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentationTest {
    @Test
    public void useAppContext() throws Exception {

    }

    @Test
    public void test1(){
        String summary="{\"entityMap\":{},\"blocks\":[{\"key\":\"2e2bm\",\"text\":\"上海书展的时候，我们做陶立夏《分开旅行》精装版...";
        int index=summary.lastIndexOf("text");
        String str2=summary.substring(0,index);
        System.out.println("str2==" + str2);

    }
}